<?php
/**
 * Created by PhpStorm.
 * User: teddy
 * Date: 5/9/16
 * Time: 1:14 PM
 */


$json = file_get_contents('https://api.thinkpage.cn/v3/weather/daily.json?key=sqcsdvosyk82l5sw&language=zh-Hans&unit=c&start=-1&days=5&location=shanghai');
$obj = json_decode($json);

echo ($obj->results[0]->daily[0]->precip);
echo '<br>';

echo ($obj->results[0]->daily[1]->precip);
echo '<br>';


echo ($obj->results[0]->daily[2]->precip);
echo '<br>';
